package com.foreverwin.mes.core.meext;






import com.sap.me.frame.Data;
import com.sap.me.frame.Utils;
import com.sap.me.frame.domain.BusinessException;

/**
 * 自定义异常
 * @author chris
 *
 */
public class ExtBusinessException  extends BusinessException {


	private String errorMessage;
	 
	

	public String getErrorMessage() {
		return errorMessage;
	}
	
	public ExtBusinessException(String message, Data data) {
		super(20101,message); 
		if (data != null && data.size() > 0 ) {
			message = Utils.replaceParameters(data, message);
		}
		this.errorMessage=message;
		
	}

	public ExtBusinessException(String message) {
		super(20101,message);
		this.errorMessage=message;
		
	}
	
	public ExtBusinessException(int error) {
		super(error); 
		
	}
	public ExtBusinessException(int error,Throwable tw) {
		super(error,tw); 
		
	}

	public ExtBusinessException(String message,Throwable tw) {
		super(20101,message,tw);		
		this.errorMessage=message;
	}	  

	 
}	